package com.colodoo.wvs.manager.script.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "script")
@Data
public class Script {
    /**
     * 脚本ID
     */
    @Id
    @Column(name = "script_id")
    private String scriptId;

    /**
     * 脚本名称
     */
     @Column(name = "script_name")
    private String scriptName;

    /**
     * 脚本类型
     */
    @Column(name = "script_type")
    private String scriptType;

    /**
     * 漏洞ID
     */
    @Column(name = "bug_id")
    private String bugId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 创建人
     */
    @Column(name = "create_user_id")
    private String createUserId;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 更新人
     */
    @Column(name = "update_user_id")
    private String updateUserId;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 脚本内容
     */
    @Column(name = "script_content")
    private String scriptContent;

}